package com.lzm.ydpt.entity.mall;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class GoodsOption implements Parcelable {
    private List<ProductSpecsBean> specs = new ArrayList<>();
    private List<ShopGoods> options = new ArrayList<>();

    protected GoodsOption(Parcel in) {
        options = in.createTypedArrayList(ShopGoods.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(options);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<GoodsOption> CREATOR = new Creator<GoodsOption>() {
        @Override
        public GoodsOption createFromParcel(Parcel in) {
            return new GoodsOption(in);
        }

        @Override
        public GoodsOption[] newArray(int size) {
            return new GoodsOption[size];
        }
    };

    public List<ProductSpecsBean> getSpecs() {
        return specs;
    }

    public void setSpecs(List<ProductSpecsBean> specs) {
        this.specs = specs;
    }

    public List<ShopGoods> getOptions() {
        return options;
    }

    public void setOptions(List<ShopGoods> options) {
        this.options = options;
    }
}
